{% macro thumbnail(image, text, link=False, alter="", align="left", width="20%") %}
  <!--
    Create image thumbnail

    $0  Image URL
    $1  Image summary
    $2  Link to refer user to it when he clicks on the image
    $3  Image alternative text
    $4  Image align (left or right)
    $5  Image width
  -->
	<div class="thumbnail" style="width: {{ width }}; float: {{ align }} !important; clear: both;">
		{% if link %}
			<a href="{{ link }}">
     	{% endif %}
			<img src="{{ image }}" alt="{{ alter }}" style="width: 100%;">
      	{% if link %}
      		</a>
      	{% endif %}
    	<div class="caption">
      		<p>{{ text }}</p>
    	</div>
    </div>
{% endmacro %}

{% macro translations(langs) %}
  <!--
    Create list contains other translations for the article

    $0  Dictionary with lang iso in the key and translation in the value
  -->
  <div class="well well-sm">
    <span>{{ gettext("In other languages:") }}</span>
    {% for lang in langs.items() %}
      <span><a href="{{ lang[1] }}">{{ lang[0] }}</a> | </span>
    {% endfor %}
  </div>
{% endmacro %}